/*
 * @Author: Laputa
 * @Date: 2023-05-30 16:15:09
 * @LastEditors: Laputa
 * @LastEditTime: 2023-09-15 18:20:36
 * @Description: 
 * 
 * Copyright (c) 2023 by Levetop, All Rights Reserved. 
 */


#ifndef _LT168_CONFIG_H_
#define _LT168_CONFIG_H_

#define IO_READ8(p)      		(*(volatile Uint8 *)(p))
#define IO_WRITE8(p,c)   		(*((volatile Uint8 *)(p)) = ((Uint8)(c)))

#define IO_READ16(p)     		(*(volatile Uint16 *)(p))
#define IO_WRITE16(p,v)  		(*((volatile Uint16 *)(p)) = (Uint16)(v))

#define IO_READ32(p)     		(*(volatile Uint32 *)(p))
#define IO_WRITE32(p,v)  		(*((volatile Uint32 *)(p)) = (Uint32)(v))


#define _USE_CRC_       1
#define _USE_DELAY_     1
#define _USE_PRINTF_    1

#include "string.h"

#include "LT168.h"
#include "LT168_eport.h"
#include "LT168_dma.h"
#include "LT168_sci.h"

//extern uint8_t DISPLAY_BUFF[];

#if _USE_CRC_
uint32_t GetCrc32(uint8_t *InStr,uint32_t len, uint32_t value);
void Make_CRC32_Table(void);
#endif

#if _USE_DELAY_
void Delay_10us(uint32_t time);
void Delay_Ms(uint32_t t);
#endif

#if _USE_PRINTF_
//void Debug_SCI_Init(sci* s);
void SerialOutChar(char c);


#include "LTPrintf.h"
void LTPrintf_Init(void *p);

#endif

#endif /* LT168_CONFIG_H_ */
